package com.lhd.app.metrics;

/**
 * 商品指标结果
 */
public class GoodsMetricsResult {
    private String startTime;    // 窗口开始时间
    private String endTime;      // 窗口结束时间
    private long uv;             // 商品访客数
    private long pv;             // 商品浏览量
    private long cartUv;         // 加购人数
    private long favorUv;        // 收藏人数

    public GoodsMetricsResult() {
    }

    public GoodsMetricsResult(String startTime, String endTime, long uv, long pv, long cartUv, long favorUv) {
        this.startTime = startTime;
        this.endTime = endTime;
        this.uv = uv;
        this.pv = pv;
        this.cartUv = cartUv;
        this.favorUv = favorUv;
    }

    // Getter和Setter方法
    public String getStartTime() { return startTime; }
    public void setStartTime(String startTime) { this.startTime = startTime; }
    
    public String getEndTime() { return endTime; }
    public void setEndTime(String endTime) { this.endTime = endTime; }
    
    public long getUv() { return uv; }
    public void setUv(long uv) { this.uv = uv; }
    
    public long getPv() { return pv; }
    public void setPv(long pv) { this.pv = pv; }
    
    public long getCartUv() { return cartUv; }
    public void setCartUv(long cartUv) { this.cartUv = cartUv; }
    
    public long getFavorUv() { return favorUv; }
    public void setFavorUv(long favorUv) { this.favorUv = favorUv; }

    @Override
    public String toString() {
        return "GoodsMetricsResult{" +
                "startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", uv=" + uv +
                ", pv=" + pv +
                ", cartUv=" + cartUv +
                ", favorUv=" + favorUv +
                '}';
    }

    public String toJSONString() {
        return "{" +
                "\"start_time\":\"" + startTime + "\"," +
                "\"end_time\":\"" + endTime + "\"," +
                "\"uv\":" + uv + "," +
                "\"pv\":" + pv + "," +
                "\"cart_uv\":" + cartUv + "," +
                "\"favor_uv\":" + favorUv +
                "}";
    }
}